package binarycrew.livewallpapers.wallpapers;

import android.content.Context;
import android.graphics.Canvas;

/**
 * User: Richard MihaloviÄ�
 *
 * Live wallpaper interface. Every live wallpaper must implement this interface.
 */

public abstract class ALiveWallpaper {
    private Integer screenWidth = 0;
    private Integer screenHeight = 0;
    protected Boolean isInitialised = false;
    protected String code = "";

    abstract public String getName();
    abstract public String getDescription();
    abstract public Double getFPS(); // required FPS, default 25

    // initialise wallpaper, pre compute data, ...
    abstract public void create();

    // free resources, cleanup ...
    abstract public void destroy();

    abstract public void drawCanvas(Canvas canvas);

	public void drawCanvasOnOffsetsChanged(Canvas c, float xOffset,
			float yOffset, float xStep, float yStep, int xPixels, int yPixels) {
			
	}
    
    // called from super class, don't set manually
    public void setScreenSize(int width, int height){
        screenWidth = width;
        screenHeight = height;
        isInitialised = true;
    }

    public Integer getWidth(){
        return screenWidth;
    }

    public Integer getHeight(){
        return screenHeight;
    }

    public String getCode(){
        return code;
    }

}